/*
 * Copyright (c) 2024-2025 LTC-CN. All rights reserved.
 * <p>
 * This file is part of the ltc-cn-springboot project.
 * <p>
 * ltc-cn-springboot is distributed under the terms of the MIT License.
 * For details, see the accompanying LICENSE file or visit:
 * <a href="https://www.ltc-cn.top/projects">...</a>
 */

package top.ltc_cn.minecraft_manager.exception;

import lombok.Getter;

import java.util.Map;

@Getter
public class CaptchaValidationException extends RuntimeException {
    private final String message;
    private final Map<String, Object> params;

    /**
     * 抛出验证码校验异常
     * @param message 错误信息
     */
    public CaptchaValidationException(String message) {
        super(message);
        this.message = message;
        this.params = Map.of("name", null);
    }

    /**
     * 抛出验证码校验异常
     * @param message 错误信息
     * @param params 参数 name
     */
    public CaptchaValidationException(String message, Map<String, Object> params) {
        super(message);
        this.message = message;
        this.params = params;
    }

}
